package com.zs.games.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.zs.games.enums.SourceTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @date 2024年02月26日 11:39
 */
@Data
@ApiModel("用户点赞")
@TableName("user_praise")
public class UserPraise {
    @ApiModelProperty(value = "用户id")
    private Integer userId;
    @ApiModelProperty(value = "来源id ")
    private Integer sourceId;
    @ApiModelProperty(value = "来源类型 1:新闻，2:动态")
    private Integer sourceType;

    public UserPraise(Integer userId, Integer sourceId, SourceTypeEnum sourceType) {
        this.userId = userId;
        this.sourceId = sourceId;
        this.sourceType = sourceType.getValue();
    }
}
